package com.rick.entity;

public final class ResultCode {
    private int code;
    private String msg;

    public ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public static final ResultCode SUCCESS = new ResultCode(0, "操作成功");

    /**
     * 系统通用错误码
     */
    public static final ResultCode SYS_ERROR = new ResultCode(1001, "系统发生未知错误（系统运行错误）");
    public static final ResultCode SYS_STRING_EMPTY = new ResultCode(1002, "参数为空(字符串)");
    public static final ResultCode SYS_CLASS_EMPTY = new ResultCode(1003, "实体类为空");
    public static final ResultCode DATA_EMPTY = new ResultCode(1004, "请求数据为空");
    public static final ResultCode DATA_FORMAT_ERROR = new ResultCode(1007, "提交数据格式错误");
    public static final ResultCode PARAM_ERROR = new ResultCode(1017, "参数错误或缺少必要参数");

    /**
     * 系统业务错误码
     */
    /*****************************虚拟产品 2000~2099*****************************/
    public static final ResultCode PRODUCT_EXIST = new ResultCode(2000, "产品已发布");
    public static final ResultCode PRODUCT_SAVE_FAIL = new ResultCode(2001, "产品保存失败");
    public static final ResultCode PRODUCT_NOT_EXIST = new ResultCode(2002, "产品不存在");
    public static final ResultCode PRODUCT_CANNOT_DEL_GOODS_ON_SHELVES = new ResultCode(2003,
            "产品不能删除，存在上架商品");
    public static final ResultCode PRODUCT_CANNOT_UPDATE_GOODS_ON_SHELVES = new ResultCode(2004,
            "产品不能修改，存在上架商品");
    public static final ResultCode PRODUCT_CANNOT_DEL_IS_LEAF = new ResultCode(2005,
            "产品不能删除，是其他产品的子产品");
    public static final ResultCode PRODUCT_CANNOT_UPDATE_IS_LEAF = new ResultCode(2006,
            "产品不能修改，是其他产品的子产品");

    /*****************************渠道 2100~2199*****************************/
    public static final ResultCode CHANNEL_EXIST = new ResultCode(2100, "渠道已存在");
    public static final ResultCode CHANNEL_SAVE_FAIL = new ResultCode(2101, "渠道保存失败");
    public static final ResultCode CHANNEL_NOT_EXIST = new ResultCode(2102, "渠道不存在");

    /*****************************商品类型 2200~2299*****************************/
    public static final ResultCode GOODS_TYPE_EXIST = new ResultCode(2200, "商品类型已存在");
    public static final ResultCode GOODS_TYPE_SAVE_FAIL = new ResultCode(2201, "商品类型保存失败");
    public static final ResultCode GOODS_TYPE_NOT_EXIST = new ResultCode(2202, "商品类型不存在");

    /*****************************商品 2300~2399*****************************/
    public static final ResultCode GOODS_NOT_EXIST = new ResultCode(2300, "商品不存在");
    public static final ResultCode GOODS_NAME_EXIST = new ResultCode(2301, "商品名称已存在");

    /*****************************优惠 2400~2499*****************************/
    public static final ResultCode ACTIVITY_RULE_DATA_PASE_ERROR = new ResultCode(2400, "活动规则数据解析错误");

    /*****************************订单 2500~2599*****************************/
    public static final ResultCode ORDER_NOT_EXIST = new ResultCode(2501, "订单不存在");
    public static final ResultCode ORDER_DEL_FAIL = new ResultCode(2502, "订单删除失败");
    public static final ResultCode ORDER_GOODS_EMPTY = new ResultCode(2503, "订单商品列表为空");
    public static final ResultCode ORDER_GOODS_NOT_EXIST = new ResultCode(2504, "订单商品不存在");
    public static final ResultCode ORDER_GOODS_SAVE_ERROR = new ResultCode(2505, "订单商品保存失败");
    public static final ResultCode ORDER_GOODS_ACTIVITY_NOT_EFFECT = new ResultCode(2506,
            "订单商品活动已失效");
    public static final ResultCode ORDER_GOODS_ACTIVITY_NOT_START = new ResultCode(2507,
            "订单商品活动未开始");
    public static final ResultCode ORDER_GOODS_ACTIVITY_ALREADY_END = new ResultCode(2508,
            "订单商品活动已结束");
    public static final ResultCode ORDER_GOODS_ACTIVITY_UNCOMBINE_ONLY_ONE = new ResultCode(2509,
            "订单商品非组合活动只能选择一个");
    public static final ResultCode ORDER_CREATE_ERROR = new ResultCode(2510, "订单创建失败");
    public static final ResultCode ORDER_GOODS_ACTIVITY_RULE_NOT_ACCESS = new ResultCode(2511, "订单商品活动规则校验失败");
    public static final ResultCode ORDER_QUERY_ERROR = new ResultCode(2520, "订单查询失败");
    public static final ResultCode ORDER_CANCEL_ERROR = new ResultCode(2512, "订单取消失败");
    public static final ResultCode ORDER_CANCEL_STATE_ERROR = new ResultCode(2513, "订单当前状态不支持取消");

    /*****************************渠道商品 2600~2699*****************************/
    public static final ResultCode CHANNEL_GOODS_NOT_EXIST = new ResultCode(2600, "渠道商品不存在");

    /*****************************发货 2700~2799*****************************/
    public static final ResultCode MULTI_DEVICE_EXIST = new ResultCode(2700, "存在多条设备信息");

    public static final ResultCode MANU_NOT_EXIST = new ResultCode(2701, "未匹配到车型信息");
    public static final ResultCode DEVICE_NOT_EXIST = new ResultCode(2702, "未匹配到设备信息");


    /**
     * 文件上传异常
     */
    public static final class UploadFile {
        public static final ResultCode MIN_SIZE = new ResultCode(5001, "文件不能小于1B");
        public static final ResultCode MAX_SIZE = new ResultCode(5002, "文件大小超过100MB");
        public static final ResultCode NOT_IMAGE = new ResultCode(5003, "文件类型不是图片");
        public static final ResultCode NOT_SUPPORT = new ResultCode(5004, "文件格式不支持");
    }

    /*****************************技能商城相关 2800~2899*****************************/
    public static final ResultCode SHELF_FAIL = new ResultCode(2801, "上架失败");
    public static final ResultCode GOODS_SAVE_FAIL = new ResultCode(2802, "物品入库失败");
    public static final ResultCode GOODS_STATUS_UNSHELF = new ResultCode(2803, "物品已下架");
    public static final ResultCode USER_NOT_LOGIN = new ResultCode(2804, "用户未登录");
    public static final ResultCode USER_NOT_EXIST = new ResultCode(2805, "用户不存在");
    public static final ResultCode REPAY_FAIL = new ResultCode(2806, "重新支付失败");
    public static final ResultCode GOODS_DOWNLOADSTATUS_SAVEFAIL = new ResultCode(2807, "物品下载状态上传失败");
    public static final ResultCode PROJECT_NOTIN_USERGROUP = new ResultCode(2808, "商品用户组中无此项目");
    public static final ResultCode GOODS_CHECK_FAIL = new ResultCode(2809, "查询物品状态失败");
    public static final ResultCode PROJECT_NOT_EXIST = new ResultCode(2810, "项目不存在");
    public static final ResultCode USERGROUP_NOT_EXIST = new ResultCode(2811, "用户组不存在");
    public static final ResultCode PROCESS_NOT_EXIST = new ResultCode(2812, "业务流程不存在");
    public static final ResultCode GOODS_IS_FREE = new ResultCode(2813, "免费商品不能购买");
    public static final ResultCode USER_EXPIRE = new ResultCode(2814, "用户登录过期，请重新登录");
    public static final ResultCode PROJECT_IN_USERGROUP = new ResultCode(2815, "项目在用户组中");
    public static final ResultCode PROJECT_EXIST = new ResultCode(2816, "项目已存在");
    public static final ResultCode USERGROUP_PROJECT_NOT_EXIST = new ResultCode(2817, "用户组-项目关联信息不存在");
    public static final ResultCode GOODS_SHELF_STATUS_INCORRENT = new ResultCode(2818, "商品状态不正确，不能上架");
    public static final ResultCode UNSHELF_FAIL = new ResultCode(2819, "下架失败");
    public static final ResultCode QUERY_GOODS_DETAIL_FAIL = new ResultCode(2820, "查询详情失败");
    public static final ResultCode GOODS_ALREADY_EXIST = new ResultCode(2821, "原商品已存在");
    public static final ResultCode PROCESS_IS_OPERATED = new ResultCode(2822, "此流程已被处理");
    public static final ResultCode GOODSNAME_IS_EXIST = new ResultCode(2823, "商品名称有重复");
    public static final ResultCode SPEAKERID_IS_EXIST = new ResultCode(2824, "发音人ID有重复");
    public static final ResultCode PACKAGENAME_IS_EXIST = new ResultCode(2825, "资源包名称有重复");
    public static final ResultCode GOODS_IS_AUDIT = new ResultCode(2826, "商品审核中");
    public static final ResultCode GOODS_IS_SHELVE = new ResultCode(2827, "商品已上架");
    public static final ResultCode RETRACT_FAIL = new ResultCode(2828, "商品撤回失败");
    public static final ResultCode USERGROUPNAME_IS_EXIST = new ResultCode(2829, "用户组名称重复");
    public static final ResultCode VERSION_NOT_EXIST = new ResultCode(2830, "版本不存在");

    /*****************************优惠券相关2900-2999*****************************/
    public static final ResultCode COUPON_NOT_EXIST = new ResultCode(2900, "优惠券不存在");
    public static final ResultCode COUPON_NOT_AUTHORITY = new ResultCode(2901, "无权限兑换或领取");
    public static final ResultCode CHANNEL_NOT_SAME = new ResultCode(2902, "渠道不一致");
    public static final ResultCode CHANNEL_SoundRecord_NOT_EXIST = new ResultCode(2903, "该渠道下的声音复刻商品不存在");
    public static final ResultCode CHANNEL_SoundRecord_More_One = new ResultCode(2904, "该渠道下的声音复刻商品存在不止一个");

}
